<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <div class="page">
    <% include components/top.inc.ejs %>
    <form action="?" method="post">
      <p>标题：<input type="text" name="title" /></p>
      <p>摘要：<textarea name="summary"></textarea></p>
      <p>图标：<input type="text" name="ico_src" /></p>
      <p>图片：<input type="text" name="big_pic_src" /></p>
      <p>内容：<textarea name="content"></textarea></p>
      <p><input type="submit" value="添加" /></p>
    </form>
    <table border="1" width="90%">        
      <tbody>
        <tr>
          <th>ID</th>
          <th>标题</th>
          <th>摘要</th>
          <th>图标</th>
          <th>图片</th>
          <th>内容</th>
        </tr>
      </tbody>
      <tbody>
        <% for (var i=0; i<news.length; i++) { %>
        <tr>
          <td><%= news[i].id %></td>
          <td><%= news[i].title %></td>
          <td><%= news[i].summary %></td>
          <td><%= news[i].ico_src %></td>
          <td><%= news[i].big_pic_src %></td>
          <td><%= news[i].content %></td>
        </tr>
        <% } %>          
      </tbody>
    </table>
  </div>
</body>
</html>